package com.appkubes.mall.admin.application.promoter.track.controller;

import com.appkubes.cloud.config.params.paramValid.ParamValid;
import com.appkubes.common.Response;
import com.appkubes.mall.admin.application.promoter.track.entity.vo.PromoterTrackSearchVO;
import com.appkubes.mall.core.controller.BaseMallPromoterTrackController;
import com.appkubes.mall.core.entity.MallPromoterTrack;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Rongjie
 * @Date: 2020/2/28
 * @Description:
 */
@Api(tags = "推广员统计模块")
@RestController
@RequestMapping("/promoter/track")
public class PromoterTrackController extends BaseMallPromoterTrackController {

    @GetMapping("/getList")
    public Response getList(@RequestBody @ParamValid PromoterTrackSearchVO searchVO) {
        MallPromoterTrack queryTrack = new MallPromoterTrack();
        BeanUtils.copyProperties(searchVO, queryTrack);
        IPage<MallPromoterTrack> trackIPage = this.selectPageByEntity(queryTrack, searchVO);
        return Response.success(trackIPage);
    }


}
